package com.wwt.collect.controller;

import com.wwt.collect.mapper.CityMapper;
import com.wwt.collect.model.City;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/index")
public class WebController {

    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private CityMapper cityMapper;

    @RequestMapping(value = "/hello")
    public List<City> helloworld() {
        List<City> dmsEnv = cityMapper.selectAll();
        return dmsEnv;
    }


}
